<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>qLibc: utilities/qio.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">qLibc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('qio_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">qio.c File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>I/O handling APIs.  
<a href="#details">More...</a></p>

<p><a href="qio_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a52246cf5f9d0bf7f359dfc0f92d555ed"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#a52246cf5f9d0bf7f359dfc0f92d555ed">MAX_IOSEND_SIZE</a>&#160;&#160;&#160;(32 * 1024)</td></tr>
<tr class="separator:a52246cf5f9d0bf7f359dfc0f92d555ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8a695a43ebb605d243e56ad48937862e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#a8a695a43ebb605d243e56ad48937862e">qio_wait_readable</a> (int fd, int timeoutms)</td></tr>
<tr class="memdesc:a8a695a43ebb605d243e56ad48937862e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test &amp; wait until the file descriptor has readable data.  <br /></td></tr>
<tr class="separator:a8a695a43ebb605d243e56ad48937862e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac905811f0daa394ffef7beab68585a55"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#ac905811f0daa394ffef7beab68585a55">qio_wait_writable</a> (int fd, int timeoutms)</td></tr>
<tr class="memdesc:ac905811f0daa394ffef7beab68585a55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test &amp; wait until the file descriptor is ready for writing.  <br /></td></tr>
<tr class="separator:ac905811f0daa394ffef7beab68585a55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa34911362f1793ed1e744d3eb63500db"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#aa34911362f1793ed1e744d3eb63500db">qio_read</a> (int fd, void *buf, size_t nbytes, int timeoutms)</td></tr>
<tr class="memdesc:aa34911362f1793ed1e744d3eb63500db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read from a file descriptor.  <br /></td></tr>
<tr class="separator:aa34911362f1793ed1e744d3eb63500db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0645cf0a3bcfc79ee3829012243d46d8"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#a0645cf0a3bcfc79ee3829012243d46d8">qio_write</a> (int fd, const void *buf, size_t nbytes, int timeoutms)</td></tr>
<tr class="memdesc:a0645cf0a3bcfc79ee3829012243d46d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write to a file descriptor.  <br /></td></tr>
<tr class="separator:a0645cf0a3bcfc79ee3829012243d46d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafd34a0ab9f916ded37b1634cac3ab6a"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#aafd34a0ab9f916ded37b1634cac3ab6a">qio_send</a> (int outfd, int infd, off_t nbytes, int timeoutms)</td></tr>
<tr class="memdesc:aafd34a0ab9f916ded37b1634cac3ab6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transfer data between file descriptors.  <br /></td></tr>
<tr class="separator:aafd34a0ab9f916ded37b1634cac3ab6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7ce64cc8cd837de47c91d1bdcb17cf5"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#ab7ce64cc8cd837de47c91d1bdcb17cf5">qio_gets</a> (int fd, char *buf, size_t bufsize, int timeoutms)</td></tr>
<tr class="memdesc:ab7ce64cc8cd837de47c91d1bdcb17cf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a line from a file descriptor into the buffer pointed to until either a terminating newline or EOF.  <br /></td></tr>
<tr class="separator:ab7ce64cc8cd837de47c91d1bdcb17cf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c00200ce1766b2b81dafd9b9f20f6d0"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#a2c00200ce1766b2b81dafd9b9f20f6d0">qio_puts</a> (int fd, const char *str, int timeoutms)</td></tr>
<tr class="memdesc:a2c00200ce1766b2b81dafd9b9f20f6d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the string and a trailing newline to file descriptor.  <br /></td></tr>
<tr class="separator:a2c00200ce1766b2b81dafd9b9f20f6d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2b7b0e9eb6e217a36422de18570b4e3"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qio_8c.html#ad2b7b0e9eb6e217a36422de18570b4e3">qio_printf</a> (int fd, int timeoutms, const char *format,...)</td></tr>
<tr class="memdesc:ad2b7b0e9eb6e217a36422de18570b4e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Formatted output to a file descriptor.  <br /></td></tr>
<tr class="separator:ad2b7b0e9eb6e217a36422de18570b4e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>I/O handling APIs. </p>

<p class="definition">Definition in file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a52246cf5f9d0bf7f359dfc0f92d555ed" name="a52246cf5f9d0bf7f359dfc0f92d555ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52246cf5f9d0bf7f359dfc0f92d555ed">&#9670;&#160;</a></span>MAX_IOSEND_SIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_IOSEND_SIZE&#160;&#160;&#160;(32 * 1024)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00044">44</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a8a695a43ebb605d243e56ad48937862e" name="a8a695a43ebb605d243e56ad48937862e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a695a43ebb605d243e56ad48937862e">&#9670;&#160;</a></span>qio_wait_readable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int qio_wait_readable </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Test &amp; wait until the file descriptor has readable data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>file descriptor </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if readable, 0 on timeout, -1 if an error occurred.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The argument timeoutms can be used to set maximum wait time for a socket descriptor. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00059">59</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<a id="ac905811f0daa394ffef7beab68585a55" name="ac905811f0daa394ffef7beab68585a55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac905811f0daa394ffef7beab68585a55">&#9670;&#160;</a></span>qio_wait_writable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int qio_wait_writable </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Test &amp; wait until the file descriptor is ready for writing. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>file descriptor </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if writable, 0 on timeout, -1 if an error occurred. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00087">87</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<a id="aa34911362f1793ed1e744d3eb63500db" name="aa34911362f1793ed1e744d3eb63500db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa34911362f1793ed1e744d3eb63500db">&#9670;&#160;</a></span>qio_read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t qio_read </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nbytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read from a file descriptor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>file descriptor </td></tr>
    <tr><td class="paramname">buf</td><td>data buffer pointer to write to </td></tr>
    <tr><td class="paramname">nbytes</td><td>the number of bytes to read from file descriptor &amp; write into buffer </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read if successful, 0 on timeout, -1 for error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00118">118</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<a id="a0645cf0a3bcfc79ee3829012243d46d8" name="a0645cf0a3bcfc79ee3829012243d46d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0645cf0a3bcfc79ee3829012243d46d8">&#9670;&#160;</a></span>qio_write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t qio_write </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nbytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write to a file descriptor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>file descriptor </td></tr>
    <tr><td class="paramname">buf</td><td>data buffer pointer to read from </td></tr>
    <tr><td class="paramname">nbytes</td><td>the number of bytes to write to file descriptor &amp; read from buffer </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes written if successful, 0 on timeout, -1 for error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00159">159</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<a id="aafd34a0ab9f916ded37b1634cac3ab6a" name="aafd34a0ab9f916ded37b1634cac3ab6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafd34a0ab9f916ded37b1634cac3ab6a">&#9670;&#160;</a></span>qio_send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off_t qio_send </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>outfd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>infd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">off_t&#160;</td>
          <td class="paramname"><em>nbytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Transfer data between file descriptors. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">outfd</td><td>output file descriptor </td></tr>
    <tr><td class="paramname">infd</td><td>input file descriptor </td></tr>
    <tr><td class="paramname">nbytes</td><td>the number of bytes to copy between file descriptors. 0 means transfer until end of infd. </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes transferred if successful, 0 on timeout, -1 for error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00199">199</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<a id="ab7ce64cc8cd837de47c91d1bdcb17cf5" name="ab7ce64cc8cd837de47c91d1bdcb17cf5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7ce64cc8cd837de47c91d1bdcb17cf5">&#9670;&#160;</a></span>qio_gets()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t qio_gets </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a line from a file descriptor into the buffer pointed to until either a terminating newline or EOF. </p>
<p>New-line characters(CR, LF ) will not be stored into buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>file descriptor </td></tr>
    <tr><td class="paramname">buf</td><td>data buffer pointer </td></tr>
    <tr><td class="paramname">bufsize</td><td>buffer size </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read if successful, 0 on timeout, -1 for error.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Be sure the return value does not mean the length of actual stored data. It means how many bytes are readed from the file descriptor, so the new-line characters will be counted, but not be stored. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00257">257</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<a id="a2c00200ce1766b2b81dafd9b9f20f6d0" name="a2c00200ce1766b2b81dafd9b9f20f6d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c00200ce1766b2b81dafd9b9f20f6d0">&#9670;&#160;</a></span>qio_puts()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t qio_puts </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes the string and a trailing newline to file descriptor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>file descriptor </td></tr>
    <tr><td class="paramname">str</td><td>string pointer </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes written including trailing newline characters if successful, 0 for timeout and -1 for errors. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00301">301</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
<a id="ad2b7b0e9eb6e217a36422de18570b4e3" name="ad2b7b0e9eb6e217a36422de18570b4e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2b7b0e9eb6e217a36422de18570b4e3">&#9670;&#160;</a></span>qio_printf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t qio_printf </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeoutms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Formatted output to a file descriptor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>file descriptor </td></tr>
    <tr><td class="paramname">timeoutms</td><td>wait timeout milliseconds. 0 for no wait, -1 for infinite wait </td></tr>
    <tr><td class="paramname">format</td><td>format string</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes written including trailing newline characters if successful, 0 for timeout and -1 for errors. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qio_8c_source.html#l00325">325</a> of file <a class="el" href="qio_8c_source.html">qio.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_7b5d38f1875f1b693f62ca6a108a1129.html">utilities</a></li><li class="navelem"><a class="el" href="qio_8c.html">qio.c</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7 </li>
  </ul>
</div>
</body>
</html>
